home *** CD-ROM | disk | FTP | other *** search
-
-
-
- EEEEXXXXPPPP((((3333MMMM)))) EEEEXXXXPPPP((((3333MMMM))))
-
-
-
- NNNNAAAAMMMMEEEE
- exp, expm1, log, log10, log1p, pow, fexp, expf, fexpm1, expm1f, flog,
- logf, flog10, log10f, flog1p, log1pf, fpow, powf, expl, expm1l, logl,
- log10l, log1pl, powl - exponential, logarithm, power
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<mmmmaaaatttthhhh....hhhh>>>>
-
- ddddoooouuuubbbblllleeee eeeexxxxpppp((((ddddoooouuuubbbblllleeee xxxx))));;;;
- ffffllllooooaaaatttt ffffeeeexxxxpppp((((ffffllllooooaaaatttt xxxx))));;;;
- ffffllllooooaaaatttt eeeexxxxppppffff((((ffffllllooooaaaatttt xxxx))));;;;
- lllloooonnnngggg ddddoooouuuubbbblllleeee eeeexxxxppppllll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
- lllloooonnnngggg ddddoooouuuubbbblllleeee eeeexxxxppppmmmm1111llll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
-
- ddddoooouuuubbbblllleeee eeeexxxxppppmmmm1111((((ddddoooouuuubbbblllleeee xxxx))));;;;
- ffffllllooooaaaatttt ffffeeeexxxxppppmmmm1111((((ffffllllooooaaaatttt xxxx))));;;;
- ffffllllooooaaaatttt eeeexxxxppppmmmm1111ffff((((ffffllllooooaaaatttt xxxx))));;;;
-
- ddddoooouuuubbbblllleeee lllloooogggg((((ddddoooouuuubbbblllleeee xxxx))));;;;
- ffffllllooooaaaatttt fffflllloooogggg((((ffffllllooooaaaatttt xxxx))));;;;
- ffffllllooooaaaatttt llllooooggggffff((((ffffllllooooaaaatttt xxxx))));;;;
- lllloooonnnngggg ddddoooouuuubbbblllleeee llllooooggggllll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
-
- ddddoooouuuubbbblllleeee lllloooogggg11110000((((ddddoooouuuubbbblllleeee xxxx))));;;;
- ffffllllooooaaaatttt fffflllloooogggg11110000((((ffffllllooooaaaatttt xxxx))));;;;
- ffffllllooooaaaatttt lllloooogggg11110000ffff((((ffffllllooooaaaatttt xxxx))));;;;
- lllloooonnnngggg ddddoooouuuubbbblllleeee lllloooogggg11110000llll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
-
- ddddoooouuuubbbblllleeee lllloooogggg1111pppp((((ddddoooouuuubbbblllleeee xxxx))));;;;
- ffffllllooooaaaatttt fffflllloooogggg1111pppp((((ffffllllooooaaaatttt xxxx))));;;;
- ffffllllooooaaaatttt lllloooogggg1111ppppffff((((ffffllllooooaaaatttt xxxx))));;;;
- lllloooonnnngggg ddddoooouuuubbbblllleeee lllloooogggg1111ppppllll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
-
- ddddoooouuuubbbblllleeee ppppoooowwww((((ddddoooouuuubbbblllleeee xxxx,,,, ddddoooouuuubbbblllleeee yyyy))));;;;
- ffffllllooooaaaatttt ppppoooowwwwffff((((ffffllllooooaaaatttt xxxx,,,, ffffllllooooaaaatttt yyyy))));;;;
- lllloooonnnngggg ddddoooouuuubbbblllleeee ppppoooowwwwllll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx,,,, \\\\
- lllloooonnnngggg ddddoooouuuubbbblllleeee yyyy))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The long double and single-precision routines listed above are only
- available in the standard math library, -_l_m, and in -_l_m_x.
-
- The _e_x_p family return the exponential function of _x, _e**x.
-
- The _e_x_p_m_1 family return exp(x)-1 accurately even for tiny _x.
-
- The _l_o_g functions return the natural logarithm of _x.
-
- The _l_o_g_1_0 functions return the base 10 logarithm of _x.
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- EEEEXXXXPPPP((((3333MMMM)))) EEEEXXXXPPPP((((3333MMMM))))
-
-
-
- The _l_o_g_1_p family return log(1+x) accurately even for tiny _x.
-
- _p_o_w(_x,_y), its single-precision counterpart _p_o_w_f(_x,_y), and its long double
- counterpart _p_o_w_l(_x,_y), return x**y.
-
- EEEERRRRRRRROOOORRRR ((((dddduuuueeee ttttoooo RRRRoooouuuunnnnddddooooffffffff eeeettttcccc....))))
- _e_x_p(_x), _l_o_g(_x), _e_x_p_m_1(_x) and _l_o_g_1_p(_x) are accurate to within an _u_l_p, and
- _l_o_g_1_0(_x) and _p_o_w(_x,_y) to within about 2 _u_l_ps; an _u_l_p is one _Unit in the
- _Last _Place. Moderate values of pow are accurate enough that
- _p_o_w(integer,integer) is exact until it is bigger than 2**53 for double.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- In the diagnostics below, functions in the standard math library _l_i_b_m._a,
- are referred to as -_l_m versions, those in math library _l_i_b_m_x._a are
- referred to as -_l_m_x versions, and those in the the BSD math library
- _l_i_b_m_4_3._a are referred to as -_l_m_4_3 versions.
- When NaN is used as an argument, a NaN is returned. The -_l_m and -_l_m_x
- versions always return the default Quiet NaN and set _e_r_r_n_o to EDOM. The
- -_l_m_4_3 versions never set _e_r_r_n_o.
- The value of HUGE_VAL is IEEE Infinity.
-
- The _e_x_p functions return HUGE_VAL when the correct value would overflow,
- and return zero if the correct value would underflow. The -_l_m and -_l_m_x
- versions set the value of _e_r_r_n_o to ERANGE for both underflow and
- overflow.
-
- The _l_o_g functions return NaN when _x is less than zero, indicating an
- invalid operation. The -_l_m _a_n_d -_l_m_x versions also set _e_r_r_n_o to EDOM.
- When _x is zero, the _l_o_g functions return -HUGE_VAL. The -_l_m and -_l_m_x
- versions set _e_r_r_n_o to ERANGE.
-
- The _p_o_w functions return NaN indicating an invalid operation, if _x is
- negative and _y is not an integer. The -_l_m and -_l_m_x versions also set
- _e_r_r_n_o to EDOM.
- When _x is zero and _y is negative, the -_l_m and -_l_m_x versions return
- HUGE_VAL and set _e_r_r_n_o to EDOM. The -_l_m_4_3 versions return HUGE_VAL.
- When both arguments are zero, the _p_o_w functions return one.
- When the correct value for _p_o_w would overflow or underflow the _p_o_w
- functions return +/-HUGE_VAL or zero, respectively. The -_l_m and -_l_m_x
- versions set _e_r_r_n_o to ERANGE.
-
- See matherr(3M) for a description of error handling for -_l_m_x functions.
-
- NNNNOOOOTTTTEEEESSSS
- Long double operations on this system are only supported in round to
- nearest rounding mode (the default). The system must be in round to
- nearest rounding mode when calling any of the long double functions, or
- incorrect answers will result.
-
- Users concerned with portability to other computer systems should note
- that the long double and float versions of these functions are optional
- according to the ANSI C Programming Language Specification ISO/IEC 9899 :
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- EEEEXXXXPPPP((((3333MMMM)))) EEEEXXXXPPPP((((3333MMMM))))
-
-
-
- 1990 (E).
-
- Long double functions have been renamed to be compliant with the ANSI-C
- standard, however to be backward compatible, they may still be called
- with the double precision function name prefixed with a q.
-
- Pow(x,0) returns x**0 = 1 for all x including x = 0 and Infinity.
- Previous implementations of pow defined _N_a_N**0 to be 1 as well, but this
- behavior has been changed to conform to the IEEE standard. Here are
- reasons for returning x**0 = 1 in all other cases:
-
- (1) Any program that already tests whether x is zero (or infinite) before
- computing x**0 cannot care whether 0**0 = 1 or not. Any program that
- depends upon 0**0 to be invalid is dubious anyway since that
- expression's meaning and, if invalid, its consequences vary from one
- computer system to another.
-
- (2) Some Algebra texts (e.g. Sigler's) define x**0 = 1 for all x,
- including x = 0. This is compatible with the convention that accepts
- a[0] as the value of polynomial
- p(x) = a[0]*x**0 + a[1]*x**1 + a[2]*x**2 +...+ a[n]*x**n
-
- at x = 0 rather than reject a[0]*0**0 as invalid.
-
- (3) Analysts will accept 0**0 = 1 despite that x**y can approach anything
- or nothing as x and y approach 0 independently. The reason for
- setting 0**0 = 1 anyway is this:
-
- If x(z) and y(z) are _a_n_y functions analytic (expandable in power
- series) in z around z = 0, and if there x(0) = y(0) = 0, then
- x(z)**y(z) -> 1 as z -> 0.
-
- (4) If 0**0 = 1, then infinity**0 = 1/0**0 = 1 too; and because x**0 = 1
- for all finite and infinite non-_N_a_N x.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- math(3M), matherr(3M)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-